import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String ret1 = scan.nextLine();
        String ret2 = scan.nextLine();
        for (int i = 0; i < ret1.length(); i++) {
            int flag = 0;
            for (int j = 0; j < ret2.length(); j++) {
                if(ret1.charAt(i) == ret2.charAt(j)){
                    System.out.print("");
                    flag = 1;
                    break;
                }
            }
            if(flag == 0){
                System.out.print(ret1.charAt(i));
            }
        }
    }
}
